<template>
  <div>
    <tablePaging :tableItem="tableItem" :operationItem="operationItem"></tablePaging>
  </div>
</template>

<script setup>
import tablePaging from '@/views/common/component/table-paging'
import { onMounted, reactive, ref, } from 'vue'
import { tableItem } from './const.js'
import { Plus, Search } from "@element-plus/icons-vue";
const operationItem = reactive({
  defaultSearch: true,//默认搜索按钮
  defaultRefresh: false,//默认重置按钮
  SearchText: "查询", //搜索文字 默认搜索
  RefreshText: "重置", //刷新文字 默认重置
  customTableHeader: true,//自定义表单头部插槽
  SearchItem: [
    {
      code: "parentName",
      name: "机构名称",
      type: 'input',
    },
    {
      code: 'nickName',
      name: '企业名称',
      type: 'input',
    },
    {
      code: "daterange",//
      startName: "开始日期", //默认是开始时间 type为 daterange生效
      rangeName: "", //默认是至 type为 daterange生效
      endName: "结束日期", //默认是结束时间 type为 daterange生效
      valueFormat: "", //默认是YYYY-MM-DD
      placeholder: "请选择日期",//默认是请选择日期type为date生效
      type: "daterange",//daterange或date
    },
  ],
  //   v-hasPermi="['monitor:job:export']"
  menuArray: []
})
onMounted(() => {
  const getUserInfo = JSON.parse(localStorage.getItem('userInfo'))
  if (getUserInfo) {
    // 机构institution 协会association 企业enterprise
    //企业不显示机构
    if (getUserInfo.typeCode == 'institution' || getUserInfo.typeCode == 'association') {
      operationItem.SearchItem[0].type = '9999'
    }
  }
})
</script>

<style scoped></style>